package com.example.sdemo.domain.entity;

public class User {

    private String name;
    private String sex;
    private String age;



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }


    @Override
    public String toString() {
        String x= "{" +
                "name:\"" + name + '\"' +
                ", sex:\"" + sex + '\"' +
                ", age:\"" + age + '\"' ;


        if(Integer.valueOf(this.age)>=18){
            x+= ", mark: \"已成年\"";
        };

         return x+ '}';
    }
}
